<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Class: AppsForYourDomain::ProvisioningAPI</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
  <script type="text/javascript">
  // <![CDATA[

  function popupCode( url ) {
    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
  }

  function toggleCode( id ) {
    if ( document.getElementById )
      elem = document.getElementById( id );
    else if ( document.all )
      elem = eval( "document.all." + id );
    else
      return false;

    elemStyle = elem.style;
    
    if ( elemStyle.display != "block" ) {
      elemStyle.display = "block"
    } else {
      elemStyle.display = "none"
    }

    return true;
  }
  
  // Make codeblocks hidden by default
  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
  
  // ]]>
  </script>

</head>
<body>



    <div id="classHeader">
        <table class="header-table">
        <tr class="top-aligned-row">
          <td><strong>Class</strong></td>
          <td class="class-name-in-header">AppsForYourDomain::ProvisioningAPI</td>
        </tr>
        <tr class="top-aligned-row">
            <td><strong>In:</strong></td>
            <td>
                <a href="../../files/appsforyourdomain/provisioningapi_rb.html">
                appsforyourdomain/provisioningapi.rb
                </a>
        <br />
            </td>
        </tr>

        <tr class="top-aligned-row">
            <td><strong>Parent:</strong></td>
            <td>
                Object
            </td>
        </tr>
        </table>
    </div>
  <!-- banner header -->

  <div id="bodyContent">



  <div id="contextContent">

    <div id="description">
      <p>
Google Apps for Your Domain Provisioning API - Example Client in Ruby
</p>
<h2>What Is This Library?</h2>
<p>
This API enables partners to create, retrieve, update and delete hosted
accounts. Partners can also use the API to create email accounts, user
aliases and mailing lists.
</p>
<p>
This module expects REXML Ruby module to be already installed
</p>
<h2>Examples</h2>
<pre>
  #!/usr/bin/ruby
  require 'appsforyourdomain/provisioningapi'
  domain    = &quot;mydomain.com&quot;
  adminuser = &quot;root@mydomain.com&quot;
  password  = &quot;secret&quot;
  a = AppsForYourDomain::ProvisioningAPI.new(domain, adminuser, password)

  newuser   = &quot;juser-test&quot;
  a.accountCreateWithEmail(&quot;joe&quot;, &quot;user&quot;,    &quot;newpass1&quot;, newuser)
  a.accountUpdate(&quot;jack&quot;,&quot;the dude&quot;,&quot;newpass2&quot;, newuser)

  a.aliasDelete(&quot;Test-Alias1&quot;)       if a.aliasRetrieve(&quot;Test-Alias1&quot;)
  a.aliasCreate(newuser,&quot;Test-Alias1&quot;)

  a.mailingListDelete(&quot;Test-Group1&quot;) if a.mailingListRetrieve(&quot;Test-Group1&quot;)
  a.mailingListCreate(&quot;Test-Group1&quot;)

  a.mailingListAddUser(&quot;Test-Group1&quot;,newuser)
  p a.accountRetrieve(newuser)
  a.mailingListRemoveUser(&quot;Test-Group1&quot;,newuser)

  a.aliasDelete(&quot;Test-Alias1&quot;)
  a.accountDelete(newuser)
  a.mailingListDelete(&quot;Test-Group1&quot;)
</pre>

    </div>


   </div>

    <div id="method-list">
      <h3 class="section-bar">Methods</h3>

      <div class="name-list">
      <a href="#M000003">accountCreate</a>&nbsp;&nbsp;
      <a href="#M000002">accountCreateWithEmail</a>&nbsp;&nbsp;
      <a href="#M000007">accountDelete</a>&nbsp;&nbsp;
      <a href="#M000006">accountRetrieve</a>&nbsp;&nbsp;
      <a href="#M000005">accountStatus</a>&nbsp;&nbsp;
      <a href="#M000004">accountUpdate</a>&nbsp;&nbsp;
      <a href="#M000008">aliasCreate</a>&nbsp;&nbsp;
      <a href="#M000010">aliasDelete</a>&nbsp;&nbsp;
      <a href="#M000009">aliasRetrieve</a>&nbsp;&nbsp;
      <a href="#M000012">mailingListAddUser</a>&nbsp;&nbsp;
      <a href="#M000011">mailingListCreate</a>&nbsp;&nbsp;
      <a href="#M000015">mailingListDelete</a>&nbsp;&nbsp;
      <a href="#M000013">mailingListRemoveUser</a>&nbsp;&nbsp;
      <a href="#M000014">mailingListRetrieve</a>&nbsp;&nbsp;
      <a href="#M000001">new</a>&nbsp;&nbsp;
      </div>
    </div>

  </div>


    <!-- if includes -->

    <div id="section">


    <div id="constants-list">
      <h3 class="section-bar">Constants</h3>

      <div class="name-list">
        <table summary="Constants">
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">NS</td>
          <td>=</td>
          <td class="context-item-value">'google:accounts:rest:protocol'</td>
          <td width="3em">&nbsp;</td>
          <td class="context-item-desc">
XML namespace for hosted account provisioning requests and responses

</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">BASEURL</td>
          <td>=</td>
          <td class="context-item-value">'https://www.google.com/a/services/v1.0/'</td>
          <td width="3em">&nbsp;</td>
          <td class="context-item-desc">
Base URL for hosted account provisioning requests

</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">LISTTAGS</td>
          <td>=</td>
          <td class="context-item-value">{       'aliases' =&gt; 'alias',       'emailLists' =&gt; 'emailList',       'emailAddresses' =&gt; 'emailAddress',     }</td>
          <td width="3em">&nbsp;</td>
          <td class="context-item-desc">
Porivisioning API response tags that map to lists. The key is the tag for
the list, the value is the tag for the items.

</td>
        </tr>
        </table>
      </div>
    </div>



    <div id="attribute-list">
      <h3 class="section-bar">Attributes</h3>

      <div class="name-list">
        <table>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">auth_token</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc">
Can be reused across sessions

</td>
        </tr>
        </table>
      </div>
    </div>
      


    <!-- if method_list -->
    <div id="methods">
      <h3 class="section-bar">Public Class methods</h3>

      <div id="method-M000001" class="method-detail">
        <a name="M000001"></a>

        <div class="method-heading">
          <a href="#M000001" class="method-signature">
          <span class="method-name">new</span><span class="method-args">(domain, email = nil, password = nil, backend = BASEURL)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Creates an Administrative object
</p>
<p>
Args:
</p>
<ul>
<li>domain: such as &quot;google.com&quot;

</li>
<li>email: Administrator user such as &quot;root@gmail.com&quot;

</li>
<li>password: Administrator password

</li>
<li>backend: <a href="ProvisioningAPI.html">ProvisioningAPI</a> URL to connect
to (normally not needed)

</li>
</ul>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000001-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000001-source">
<pre>
<span class="ruby-comment cmt"># File appsforyourdomain/provisioningapi.rb, line 90</span>
    <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">domain</span>, <span class="ruby-identifier">email</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">password</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">backend</span> = <span class="ruby-constant">BASEURL</span>)
      <span class="ruby-identifier">creds</span> = {<span class="ruby-value str">'accountType'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'HOSTED'</span>, <span class="ruby-value str">'Email'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">email</span>,
               <span class="ruby-value str">'Passwd'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">password</span>}
      <span class="ruby-ivar">@domain</span> = <span class="ruby-identifier">domain</span>
      <span class="ruby-ivar">@conn</span> = <span class="ruby-constant">AppsForYourDomain</span><span class="ruby-operator">::</span><span class="ruby-constant">Connection</span>.<span class="ruby-identifier">new</span> <span class="ruby-identifier">backend</span>
      <span class="ruby-ivar">@conn</span>.<span class="ruby-identifier">user_agent</span> = <span class="ruby-value str">&quot;Ruby-ProvisioningAPI/0.1&quot;</span>
      <span class="ruby-ivar">@auth_token</span> = <span class="ruby-ivar">@conn</span>.<span class="ruby-identifier">clientAuth</span>(<span class="ruby-identifier">creds</span>)[<span class="ruby-value str">'SID'</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">password</span>
      <span class="ruby-ivar">@backend</span> = <span class="ruby-identifier">backend</span>
    <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <h3 class="section-bar">Public Instance methods</h3>

      <div id="method-M000003" class="method-detail">
        <a name="M000003"></a>

        <div class="method-heading">
          <span class="method-name">accountCreate</span><span class="method-args">(firstName, lastName, password, userName, quota = 0)</span>
        </div>
      
        <div class="method-description">
          <p>
Alias for <a href="ProvisioningAPI.html#M000002">accountCreateWithEmail</a>
</p>
        </div>
      </div>

      <div id="method-M000002" class="method-detail">
        <a name="M000002"></a>

        <div class="method-heading">
          <a href="#M000002" class="method-signature">
          <span class="method-name">accountCreateWithEmail</span><span class="method-args">(firstName, lastName, password, userName, quota = 0)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Creates a new user with an email account Args:
</p>
<ul>
<li>firstName &#8212; The firstName of the user.

</li>
<li>lastName &#8212; The lastName of the user.

</li>
<li>password &#8212; The password for the user.

</li>
<li>userName &#8212; The userName of the user.

</li>
<li>quota &#8212; email quota in MB (Only specify if your domain has custom

</li>
</ul>
<p>
quota values.
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000002-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000002-source">
<pre>
<span class="ruby-comment cmt"># File appsforyourdomain/provisioningapi.rb, line 199</span>
    <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">accountCreateWithEmail</span>(<span class="ruby-identifier">firstName</span>, <span class="ruby-identifier">lastName</span>, <span class="ruby-identifier">password</span>, <span class="ruby-identifier">userName</span>, <span class="ruby-identifier">quota</span> = <span class="ruby-value">0</span>)
      <span class="ruby-identifier">request</span> <span class="ruby-value str">'Create/Account/Email'</span>, {
        <span class="ruby-value str">'type'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'Account'</span>,  <span class="ruby-value str">'CreateSection'</span> =<span class="ruby-operator">&gt;</span> {
        <span class="ruby-value str">'firstName'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">firstName</span>, <span class="ruby-value str">'lastName'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">lastName</span>,
        <span class="ruby-value str">'password'</span>  =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">password</span>,  <span class="ruby-value str">'userName'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">userName</span>,
        <span class="ruby-value str">'quota'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">quota</span>
      }}
    <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000007" class="method-detail">
        <a name="M000007"></a>

        <div class="method-heading">
          <a href="#M000007" class="method-signature">
          <span class="method-name">accountDelete</span><span class="method-args">(userName)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Deletes a user
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000007-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000007-source">
<pre>
<span class="ruby-comment cmt"># File appsforyourdomain/provisioningapi.rb, line 237</span>
    <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">accountDelete</span>(<span class="ruby-identifier">userName</span>)
      <span class="ruby-identifier">request</span> <span class="ruby-value str">'Delete/Account'</span>, {
        <span class="ruby-value str">'queryKey'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'userName'</span>, <span class="ruby-value str">'queryData'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">userName</span>, <span class="ruby-value str">'type'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'Account'</span>
      }
    <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000006" class="method-detail">
        <a name="M000006"></a>

        <div class="method-heading">
          <a href="#M000006" class="method-signature">
          <span class="method-name">accountRetrieve</span><span class="method-args">(userName)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Retrieves information about a user
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000006-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000006-source">
<pre>
<span class="ruby-comment cmt"># File appsforyourdomain/provisioningapi.rb, line 230</span>
    <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">accountRetrieve</span>(<span class="ruby-identifier">userName</span>)
      <span class="ruby-identifier">request</span> <span class="ruby-value str">'Retrieve/Account'</span>, {
        <span class="ruby-value str">'queryKey'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'userName'</span>, <span class="ruby-value str">'queryData'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">userName</span>, <span class="ruby-value str">'type'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'Account'</span>
      }
    <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000005" class="method-detail">
        <a name="M000005"></a>

        <div class="method-heading">
          <a href="#M000005" class="method-signature">
          <span class="method-name">accountStatus</span><span class="method-args">(userName, lock = false)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Lock/unlock an account
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000005-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000005-source">
<pre>
<span class="ruby-comment cmt"># File appsforyourdomain/provisioningapi.rb, line 221</span>
    <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">accountStatus</span>(<span class="ruby-identifier">userName</span>, <span class="ruby-identifier">lock</span> = <span class="ruby-keyword kw">false</span>)
      <span class="ruby-identifier">request</span> <span class="ruby-value str">'Update/Account/Status'</span>, {
        <span class="ruby-value str">'queryKey'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'userName'</span>, <span class="ruby-value str">'queryData'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">userName</span>,
        <span class="ruby-value str">'type'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'Account'</span>,  <span class="ruby-value str">'UpdateSection'</span> =<span class="ruby-operator">&gt;</span> {
        <span class="ruby-value str">'accountStatus'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">lock</span> <span class="ruby-value">? </span><span class="ruby-value str">&quot;locked&quot;</span> <span class="ruby-operator">:</span> <span class="ruby-value str">&quot;unlocked&quot;</span>,
      }}
    <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000004" class="method-detail">
        <a name="M000004"></a>

        <div class="method-heading">
          <a href="#M000004" class="method-signature">
          <span class="method-name">accountUpdate</span><span class="method-args">(firstName, lastName, password, userName, oldUserName = userName)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Updates an existing user
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000004-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000004-source">
<pre>
<span class="ruby-comment cmt"># File appsforyourdomain/provisioningapi.rb, line 210</span>
    <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">accountUpdate</span>(<span class="ruby-identifier">firstName</span>, <span class="ruby-identifier">lastName</span>, <span class="ruby-identifier">password</span>,
          <span class="ruby-identifier">userName</span>, <span class="ruby-identifier">oldUserName</span> = <span class="ruby-identifier">userName</span>)
      <span class="ruby-identifier">request</span> <span class="ruby-value str">'Update/Account'</span>, {
        <span class="ruby-value str">'queryKey'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'userName'</span>, <span class="ruby-value str">'queryData'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">oldUserName</span>,
        <span class="ruby-value str">'type'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'Account'</span>,  <span class="ruby-value str">'UpdateSection'</span> =<span class="ruby-operator">&gt;</span> {
        <span class="ruby-value str">'firstName'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">firstName</span>, <span class="ruby-value str">'lastName'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">lastName</span>,
        <span class="ruby-value str">'password'</span>  =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">password</span>,  <span class="ruby-value str">'userName'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">userName</span>,
      }}
    <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000008" class="method-detail">
        <a name="M000008"></a>

        <div class="method-heading">
          <a href="#M000008" class="method-signature">
          <span class="method-name">aliasCreate</span><span class="method-args">(userName, aliasName)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Creates an alias to an existing user
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000008-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000008-source">
<pre>
<span class="ruby-comment cmt"># File appsforyourdomain/provisioningapi.rb, line 254</span>
     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">aliasCreate</span>(<span class="ruby-identifier">userName</span>, <span class="ruby-identifier">aliasName</span>)
      <span class="ruby-identifier">request</span> <span class="ruby-value str">'Create/Alias'</span>, {
        <span class="ruby-value str">'type'</span>     =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'Alias'</span>,  <span class="ruby-value str">'CreateSection'</span> =<span class="ruby-operator">&gt;</span> {
        <span class="ruby-value str">'userName'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">userName</span>, <span class="ruby-value str">'aliasName'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">aliasName</span>,
      }}
    <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000010" class="method-detail">
        <a name="M000010"></a>

        <div class="method-heading">
          <a href="#M000010" class="method-signature">
          <span class="method-name">aliasDelete</span><span class="method-args">(aliasName)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Deletes an alias
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000010-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000010-source">
<pre>
<span class="ruby-comment cmt"># File appsforyourdomain/provisioningapi.rb, line 269</span>
    <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">aliasDelete</span>(<span class="ruby-identifier">aliasName</span>)
      <span class="ruby-identifier">request</span> <span class="ruby-value str">'Delete/Alias'</span>, {
        <span class="ruby-value str">'queryKey'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'aliasName'</span>, <span class="ruby-value str">'queryData'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">aliasName</span>, <span class="ruby-value str">'type'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'Alias'</span>
      }
    <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000009" class="method-detail">
        <a name="M000009"></a>

        <div class="method-heading">
          <a href="#M000009" class="method-signature">
          <span class="method-name">aliasRetrieve</span><span class="method-args">(aliasName)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Fetch an alias definition
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000009-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000009-source">
<pre>
<span class="ruby-comment cmt"># File appsforyourdomain/provisioningapi.rb, line 262</span>
    <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">aliasRetrieve</span>(<span class="ruby-identifier">aliasName</span>)
      <span class="ruby-identifier">request</span> <span class="ruby-value str">'Retrieve/Alias'</span>, {
        <span class="ruby-value str">'queryKey'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'aliasName'</span>, <span class="ruby-value str">'queryData'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">aliasName</span>, <span class="ruby-value str">'type'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'Alias'</span>
      }
    <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000012" class="method-detail">
        <a name="M000012"></a>

        <div class="method-heading">
          <a href="#M000012" class="method-signature">
          <span class="method-name">mailingListAddUser</span><span class="method-args">(mailingListName, username)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Adds a user to a mailinglist
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000012-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000012-source">
<pre>
<span class="ruby-comment cmt"># File appsforyourdomain/provisioningapi.rb, line 284</span>
    <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">mailingListAddUser</span>(<span class="ruby-identifier">mailingListName</span>, <span class="ruby-identifier">username</span>)
      <span class="ruby-identifier">mailingListUpdate</span>(<span class="ruby-identifier">mailingListName</span>, <span class="ruby-identifier">username</span>, <span class="ruby-value str">'add'</span>)
    <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000011" class="method-detail">
        <a name="M000011"></a>

        <div class="method-heading">
          <a href="#M000011" class="method-signature">
          <span class="method-name">mailingListCreate</span><span class="method-args">(mailingListName)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Creates a new mailing list
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000011-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000011-source">
<pre>
<span class="ruby-comment cmt"># File appsforyourdomain/provisioningapi.rb, line 276</span>
    <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">mailingListCreate</span>(<span class="ruby-identifier">mailingListName</span>)
      <span class="ruby-identifier">request</span> <span class="ruby-value str">'Create/MailingList'</span>, {
        <span class="ruby-value str">'type'</span>            =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'MailingList'</span>,  <span class="ruby-value str">'CreateSection'</span> =<span class="ruby-operator">&gt;</span> {
        <span class="ruby-value str">'mailingListName'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">mailingListName</span>
      }}
    <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000015" class="method-detail">
        <a name="M000015"></a>

        <div class="method-heading">
          <a href="#M000015" class="method-signature">
          <span class="method-name">mailingListDelete</span><span class="method-args">(mailingListName)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Removes a mailing list
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000015-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000015-source">
<pre>
<span class="ruby-comment cmt"># File appsforyourdomain/provisioningapi.rb, line 318</span>
    <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">mailingListDelete</span>(<span class="ruby-identifier">mailingListName</span>)
      <span class="ruby-identifier">request</span> <span class="ruby-value str">'Delete/MailingList'</span>, {
        <span class="ruby-value str">'queryKey'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'mailingListName'</span>, <span class="ruby-value str">'queryData'</span>     =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">mailingListName</span>,
        <span class="ruby-value str">'type'</span>     =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'MailingList'</span>,
      }
    <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000013" class="method-detail">
        <a name="M000013"></a>

        <div class="method-heading">
          <a href="#M000013" class="method-signature">
          <span class="method-name">mailingListRemoveUser</span><span class="method-args">(mailingListName, username)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Removes a user from a mailinglist
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000013-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000013-source">
<pre>
<span class="ruby-comment cmt"># File appsforyourdomain/provisioningapi.rb, line 289</span>
    <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">mailingListRemoveUser</span>(<span class="ruby-identifier">mailingListName</span>, <span class="ruby-identifier">username</span>)
      <span class="ruby-identifier">mailingListUpdate</span>(<span class="ruby-identifier">mailingListName</span>, <span class="ruby-identifier">username</span>, <span class="ruby-value str">'remove'</span>)
    <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000014" class="method-detail">
        <a name="M000014"></a>

        <div class="method-heading">
          <a href="#M000014" class="method-signature">
          <span class="method-name">mailingListRetrieve</span><span class="method-args">(mailingListName)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Fetches mailing list membership
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000014-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000014-source">
<pre>
<span class="ruby-comment cmt"># File appsforyourdomain/provisioningapi.rb, line 310</span>
    <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">mailingListRetrieve</span>(<span class="ruby-identifier">mailingListName</span>)
      <span class="ruby-identifier">request</span> <span class="ruby-value str">'Retrieve/MailingList'</span>, {
        <span class="ruby-value str">'queryKey'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'mailingListName'</span>, <span class="ruby-value str">'queryData'</span>     =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">mailingListName</span>,
        <span class="ruby-value str">'type'</span>     =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'MailingList'</span>,
      }
    <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>


    </div>


  </div>


<div id="validator-badges">

<p><small>

  Copyright 2006 Google Inc.  Licensed under the 
  <a href="http://www.apache.org/licenses/LICENSE-2.0" target="_blank"
  >Apache License, Version 2.0</a> (the "License").

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  License for the specific language governing permissions and limitations under
  the License.

</small></p>
</div>

</body>
</html>